package com.gec.mall.controller;

import com.gec.mall.pojo.RespBean;
import com.gec.mall.service.ItemCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: li
 * @Date: 2023/2/3
 * @PACKAGE_NAME:com.gec.mall.controller
 * @Project_Name:mall-parent
 * @VERSION: 1.0.0
 */
@RestController
@RequestMapping("/ItemCat")
public class TtemCatController {

    @Autowired
    private ItemCategoryService itemCategoryService;

    @GetMapping("/getItemCatNext/{id}")
    public RespBean getItemCatByPId(@PathVariable Long id){
        return RespBean.ok("", itemCategoryService.getItemCatByParentId(id));
    }
}
